home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ToolUtils.h
-
- Copyright: © 1984-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
-
- #ifndef __TOOLUTILS__
- #define __TOOLUTILS__
-
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- /* #include <ConditionalMacros.h> */
-
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- #endif
- /* #include <MixedMode.h> */
- /* #include <QuickdrawText.h> */
-
- #ifndef __OSUTILS__
- #include <OSUtils.h>
- #endif
- /* #include <Memory.h> */
-
- #ifndef __TEXTUTILS__
- #include <TextUtils.h>
- #endif
- /* #include <Script.h> */
- /* #include <IntlResources.h> */
- /* #include <Events.h> */
-
- #ifndef __FIXMATH__
- #include <FixMath.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if GENERATINGPOWERPC
- #pragma options align=mac68k
- #endif
-
- #ifdef __CFM68K__
- #pragma lib_export on
- #endif
-
-
- enum {
- sysPatListID = 0,
- iBeamCursor = 1,
- crossCursor = 2,
- plusCursor = 3,
- watchCursor = 4
- };
-
- struct Int64Bit {
- long hiLong;
- unsigned long loLong;
- };
- typedef struct Int64Bit Int64Bit;
-
- extern pascal Fixed FixRatio(short numer, short denom)
- ONEWORDINLINE(0xA869);
- extern pascal Fixed FixMul(Fixed a, Fixed b)
- ONEWORDINLINE(0xA868);
- extern pascal short FixRound(Fixed x)
- ONEWORDINLINE(0xA86C);
- extern pascal void PackBits(Ptr *srcPtr, Ptr *dstPtr, short srcBytes)
- ONEWORDINLINE(0xA8CF);
- extern pascal void UnpackBits(Ptr *srcPtr, Ptr *dstPtr, short dstBytes)
- ONEWORDINLINE(0xA8D0);
- extern pascal Boolean BitTst(const void *bytePtr, long bitNum)
- ONEWORDINLINE(0xA85D);
- extern pascal void BitSet(void *bytePtr, long bitNum)
- ONEWORDINLINE(0xA85E);
- extern pascal void BitClr(void *bytePtr, long bitNum)
- ONEWORDINLINE(0xA85F);
- extern pascal long BitAnd(long value1, long value2)
- ONEWORDINLINE(0xA858);
- extern pascal long BitOr(long value1, long value2)
- ONEWORDINLINE(0xA85B);
- extern pascal long BitXor(long value1, long value2)
- ONEWORDINLINE(0xA859);
- extern pascal long BitNot(long value)
- ONEWORDINLINE(0xA85A);
- extern pascal long BitShift(long value, short count)
- ONEWORDINLINE(0xA85C);
- #if GENERATING68K
- extern pascal void LongMul(long a, long b, Int64Bit *result)
- ONEWORDINLINE(0xA867);
- #else
- #define LongMul(a, b, result) ((void) WideMultiply((a), (b), (wide*)(result)))
- #endif
- #if OLDROUTINELOCATIONS
- extern pascal Handle GetIcon(short iconID)
- ONEWORDINLINE(0xA9BB);
- extern pascal void PlotIcon(const Rect *theRect, Handle theIcon)
- ONEWORDINLINE(0xA94B);
- #endif
- extern pascal PatHandle GetPattern(short patternID)
- ONEWORDINLINE(0xA9B8);
- extern pascal CursHandle GetCursor(short cursorID)
- ONEWORDINLINE(0xA9B9);
- extern pascal PicHandle GetPicture(short pictureID)
- ONEWORDINLINE(0xA9BC);
- extern pascal Fixed SlopeFromAngle(short angle)
- ONEWORDINLINE(0xA8BC);
- extern pascal short AngleFromSlope(Fixed slope)
- ONEWORDINLINE(0xA8C4);
- extern pascal long DeltaPoint(Point ptA, Point ptB)
- ONEWORDINLINE(0xA94F);
- extern pascal void ShieldCursor(const Rect *shieldRect, Point offsetPt)
- ONEWORDINLINE(0xA855);
- extern pascal void ScreenRes(short *scrnHRes, short *scrnVRes)
- SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
- extern pascal void GetIndPattern(Pattern *thePat, short patternListID, short index);
- #if CGLUESUPPORTED
- extern void shieldcursor(const Rect *shieldRect, Point *offsetPt);
- extern long deltapoint(Point *ptA, Point *ptB);
- #endif
- #define HiWord(x) ((short)((long)(x) >> 16))
- #define LoWord(x) ((short)(x))
-
- #ifdef __CFM68K__
- #pragma lib_export off
- #endif
-
- #if GENERATINGPOWERPC
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __TOOLUTILS__ */
-